/**
 * title 菜单标题
 * name 路由名称
 * path 路由地址，不填写则不初始化路由
 * component 路由组件地址，不填写则不初始化路由
 * redirect 路由重定向
 * hideInMenu 是否隐藏菜单 默认展示 true
 * showName 配合hideInMenu使用 隐藏后菜单栏展示对应的active
 * child 子路由
 * hasGroup 是否是分组
 * pname 旧saas跳转链接额外参数
 */
let Main = () => import('@/components/main')
export const menu = [
  {
    title: '首页',
    name: 'home',
    path: '/',
    icon: 'home',
    component: Main,
    secondMenuTitle: '首页',
    child: [
      {
        title: '首页',
        name: 'index',
        path: '/',
        component: () => import('@/view/home/index.vue')
      }
    ]
  },
  {
    title: '上传',
    name: 'upload',
    path: '/upload',
    component: () => import('@/view/upload/index.vue'),
    redirect: '/upload/do',
    hideInMenu: true,
    child: [
      {
        title: '登录',
        name: 'upload_do',
        path: '/upload/do',
        component: () => import('@/view/upload/upload.vue')
      },
    ]
  },
  {
    title: '登录',
    name: 'login',
    path: '/login',
    component: () => import('@/view/login/index.vue'),
    redirect: '/login/signin',
    hideInMenu: true,
    child: [
      {
        title: '登录',
        name: 'signin',
        path: '/login/signin',
        component: () => import('@/view/login/signin.vue')
      },
      {
        title: '注册',
        name: 'signup',
        path: '/login/signup',
        component: () => import('@/view/login/signup.vue')
      }
    ]
  },
  {
    title: '商家',
    name: 'company',
    path: '/company',
    icon: 'user',
    redirect: '/company/vendors',
    component: Main,
    secondMenuTitle: '商家管理',
    child: [
      {
        title: '合伙人管理',
        hasGroup: true,
        child: [
          {
            title: '合伙人管理',
            name: 'partner',
            path: '/company/partner',
            keepAlive: true,
            component: () =>
              import('@/view/partner/index.vue')
          },
          {
            title: '添加合伙人',
            name: 'partner_create',
            path: '/partner/partner_create',
            keepAlive: true,
            component: () =>
              import('@/view/partner/create.vue')
          },
          {
            title: '编辑合伙人',
            name: 'partner_edit',
            path: '/partner/partner_edit',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/partner/edit.vue')
          },
          {
            title: '子账号管理',
            name: 'partner_account',
            path: '/partner/partner_account',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/partner/account.vue')
          },
          {
            title: '角色管理',
            name: 'partner_role',
            path: '/partner/partner_role',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/partner/role.vue')
          },
        ]
      },
      {
        title: '供应商管理',
        hasGroup: true,
        child: [
          {
            title: '供应商管理',
            name: 'vendors',
            path: '/company/vendors',
            keepAlive: true,
            component: () =>
              import('@/view/vendor/index.vue')
          },
          {
            title: '添加供应商',
            name: 'vendor_create',
            path: '/company/vendor_create',
            keepAlive: true,
            component: () =>
              import('@/view/vendor/create.vue')
          },
          {
            title: '编辑供应商',
            name: 'vendor_edit',
            path: '/company/vendor_edit',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/vendor/edit.vue')
          },
          {
            title: '子账号管理',
            name: 'vendor_account',
            path: '/company/vendor_account',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/vendor/account.vue')
          },
          {
            title: '角色管理',
            name: 'vendor_role',
            path: '/company/vendor_role',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/vendor/role.vue')
          },
        ]
      },
      {
        title: '商家管理',
        hasGroup: true,
        child: [
          {
            title: '商家管理',
            name: 'shops',
            path: '/company/shops',
            keepAlive: true,
            component: () =>
              import('@/view/shop/index.vue')
          },
          {
            title: '添加商家',
            name: 'shop_create',
            path: '/company/shop_create',
            keepAlive: true,
            component: () =>
              import('@/view/shop/create.vue')
          },
          {
            title: '编辑商家',
            name: 'shop_edit',
            path: '/company/shop_edit',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/shop/edit.vue')
          },
        ]
      }
    ]
  },
  {
    title: '商品',
    name: 'goods',
    path: '/goods',
    icon: 'shopping-cart',
    component: Main,
    secondMenuTitle: '商品管理',
    redirect: '/goods_list',
    child: [
      {
        title: '商品管理',
        hasGroup: true,
        child: [
          {
            title: '商品库',
            name: 'goods_list',
            path: '/goods_list',
            component: () =>
              import('@/view/goods/list.vue')
          },
          {
            title: '商品审核',
            name: 'goods_check',
            path: '/goods_check',
            component: () =>
              import('@/view/goods/check.vue')
          },
          {
            title: '商品详情',
            name: 'goods_detail',
            path: '/goods_detail',
            hideInMenu: true,
            component: () =>
              import('@/view/goods/detail.vue')
          },
          {
            title: '编辑商品',
            name: 'goods_edit',
            path: '/goods_edit',
            hideInMenu: true,
            component: () =>
              import('@/view/goods/edit.vue')
          },
          // {
          //   title: '选品',
          //   name: 'alibaba_goods',
          //   path: '/alibaba_goods',
          //   component: () =>
          //   import('@/view/alibaba/goods.vue')
          // },
          // {
          //   title: '选品入库',
          //   name: 'alibaba_goods_add',
          //   path: '/alibaba_goods_add',
          //   hideInMenu: true,
          //   component: () =>
          //   import('@/view/alibaba/add.vue')
          // },
          // {
          //   title: '选品库',
          //   name: 'alibaba_group',
          //   path: '/alibaba_group',
          //   hideInMenu: true,
          //   component: () =>
          //   import('@/view/alibaba/group.vue')
          // },
        ]
      },
    ]
  },
  {
    title: '订单',
    name: 'orders',
    path: '/orders',
    icon: 'list',
    component: Main,
    secondMenuTitle: '订单管理',
    redirect: '/order_all',
    child: [
      {
        title: '订单管理',
        hasGroup: true,
        child: [
          {
            title: '全部订单',
            name: 'order_all',
            path: '/order_all',
            component: () =>
              import('@/view/order/all.vue')
          },
          {
            title: '待发货',
            name: 'order_send',
            path: '/order_send',
            component: () =>
              import('@/view/order/send.vue')
          },
          {
            title: '待收货',
            name: 'order_receive',
            path: '/order_receive',
            component: () =>
              import('@/view/order/receive.vue')
          },
          {
            title: '已完成',
            name: 'order_complete',
            path: '/order_complete',
            component: () =>
              import('@/view/order/complete.vue')
          },
          {
            title: '已关闭',
            name: 'order_close',
            path: '/order_close',
            component: () =>
              import('@/view/order/close.vue')
          },
          {
            title: '维权订单',
            name: 'order_feedback',
            path: '/order_feedback',
            component: () =>
              import('@/view/order/feedback.vue')
          },
          {
            title: '订单详情',
            name: 'order_detail',
            path: '/order_detail',
            hideInMenu: true,
            component: () =>
              import('@/view/order/detail.vue')
          },
        ]
      }
    ]
  },
  {
    title: '财务',
    name: 'finance',
    path: '/finance_detail',
    icon: 'book',
    component: Main,
    secondMenuTitle: '财务',
    redirect: '/finance_detail',
    child: [
      {
        title: '供应商结算',
        hasGroup: true,
        child: [
          {
            title: '提现管理',
            name: 'finance_balance',
            path: '/finance_balance',
            component: () =>
              import('@/view/finance/balance.vue')
          },
          {
            title: '资金明细',
            name: 'agency_record',
            path: '/agency_record',
            component: () =>
              import('@/view/finance/agency_record.vue')
          },
          {
            title: '结算管理',
            name: 'finance_detail',
            path: '/finance_detail',
            component: () =>
              import('@/view/finance/detail.vue')
          },
          {
            title: '对账单',
            name: 'finance_bill',
            path: '/finance_bill',
            component: () =>
              import('@/view/finance/bill.vue')
          },
        ]
      },
      {
        title: '合伙人结算',
        hasGroup: true,
        child: [
          {
            title: '提现管理',
            name: 'finance_balances',
            path: '/finance_balances',
            component: () =>
              import('@/view/financeP/balance.vue')
          },
          {
            title: '资金明细',
            name: 'agency_records',
            path: '/agency_records',
            component: () =>
              import('@/view/financeP/agency_record.vue')
          },
          {
            title: '结算管理',
            name: 'finance_details',
            path: '/finance_details',
            component: () =>
              import('@/view/financeP/detail.vue')
          },
          {
            title: '对账单',
            name: 'finance_bills',
            path: '/finance_bills',
            component: () =>
              import('@/view/financeP/bill.vue')
          },
        ]
      },
      {
        title: '商家结算',
        hasGroup: true,
        child: [
          {
            title: '资金明细',
            name: 'seller_record',
            path: '/seller_record',
            component: () =>
              import('@/view/finance/seller_record.vue')
          }
        ]
      }
    ]
  },
  {
    title: '统计',
    name: 'report',
    path: '/report',
    icon: 'chart-pie',
    component: Main,
    secondMenuTitle: '数据统计',
    redirect: '/report_summary',
    child: [
      {
        title: '数据统计',
        hasGroup: true,
        child: [
          {
            title: '基础统计',
            name: 'report_summary',
            path: '/report_summary',
            component: () =>
              import('@/view/report/summary.vue')
          },
        ]
      }

    ]
  },
  {
    title: '设置',
    name: 'industries',
    path: '/industries',
    icon: 'cog',
    component: Main,
    secondMenuTitle: '参数设置',
    redirect: '/industries',
    child: [
      {
        title: '基础设置',
        hasGroup: true,
        child: [
          {
            title: '行业管理',
            name: 'industries',
            path: '/industries',
            keepAlive: true,
            component: () =>
              import('@/view/setting/industry.vue')
          },
          {
            title: '行业分类管理',
            name: 'industry_categories',
            path: '/industry_categories',
            keepAlive: true,
            component: () =>
              import('@/view/setting/industry_category.vue')
          },
          {
            title: '品牌管理',
            name: 'industry_brands',
            path: '/industry_brands',
            keepAlive: true,
            component: () =>
              import('@/view/setting/industry_brand.vue')
          },
          {
            title: '物流公司管理',
            name: 'logistics',
            path: '/logistics',
            keepAlive: true,
            component: () =>
              import('@/view/setting/logistics.vue')
          },
          {
            title: '操作日志',
            name: 'logs',
            path: '/logs',
            keepAlive: true,
            component: () =>
              import('@/view/setting/log.vue')
          },
          {
            title: '子账号管理',
            name: 'admins',
            path: '/admins',
            keepAlive: true,
            component: () =>
              import('@/view/setting/account.vue')
          },
          {
            title: '修改密码',
            name: 'modify_password',
            path: '/modify_password',
            keepAlive: true,
            hideInMenu: true,
            component: () =>
              import('@/view/setting/modify_password.vue')
          },
          // {
          //   title: 'SKU管理',
          //   name: 'category_skus',
          //   path: '/category_skus',
          //   keepAlive: true,
          //   component: () =>
          //   import('@/view/setting/category_sku.vue')
          // },
        ]
      }
    ]
  }
]
